<div ng-controller="specialAuthorizeListCtrl">
    <div class="table-header table-header-border clearfix ng-scope">
        <span class="fl lh30 f14">特批授权</span>
    </div>
    <my-nav data-nav-items="filterDataCities" onchanged="changeCity" data-title="城市区域:" data-text-field="areaName"></my-nav>
    <my-nav data-nav-items="filterFulfils" onchanged="changeFulfil" data-title="是否兑现:"></my-nav>    

    <div class="table-header mt20 clearfix ng-scope">
        <span class="fl lh30 f14">特批授权列表</span>
        <div class="fr btn-group permission p-0500-inline-block">
            <input class="input-text fl" style="width: 470px;" type="text" placeholder="租户名称/合同编号"
                   ng-model="query.keyword"
                   ng-enter="query.execute()"/>
            <a class="btn" href="javascript: void(0)"
               ng-click="query.execute()">查询</a>
        </div>
    </div>

    <div id="grid" class="table-responsive mt10">
        <table class="table table-hover">
            <thead>
            <tr>
                <th width="40" class="text-center">序号</th>
                <th width="180">租户信息</th>
                <th width="200">合同信息</th>
                <th width="200">应用信息</th>
                <th width="150">特批类型</th>
                <th width="180">特批信息</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="record in authorizes">
                <td class="text-center"><p ng-bind="$index + 1 + startPageIndex"></p></td>
                <td>
                    <p>租户名称：{{record.FriendlyName}}</p>
                    <p>企业号：{{record.UniqueName}}</p>
                </td>
                <td>
                    <p>{{record.contract_code}}</p>
                    <p class="tab-text-gray">租期：{{ record.BeginOn|strdate:'yyyy-MM-dd'}}至{{ record.EndOn|strdate:'yyyy-MM-dd'}}</p>
                </td>
                <td>
                         <p ng-repeat="app in record.applications">
                            {{app.FriendlyName}}：{{app.TotalNum}}（按项目数）
                        </p>   
                </td>
                <td>
                    <p ng-bind="record.categoryName"></p>
                </td>
                <td>
                    <p>兑现责任人：{{record.principalName}}</p>
                    <p>承诺日期：{{record.promiseFulfilTime|strdate:'yyyy-MM-dd'}}</p>
                    <p>兑现日期：{{record.actualFulfilTime|strdate:'yyyy-MM-dd'}}</p>
                </td>            
                <td>
                    <a 
                        href="javascript:;"
                        class="tab-text permission p-0501-inline-block"
                        ui-dialog="编辑特批授权"
                        ui-dialog-data="record"
                        ui-dialog-show="onAuthorizeEditShow(record,$dialog,$dialogScope)"
                        ui-dialog-ok="saveAuthorize($dialog,$dialogScope)"
                        ui-dialog-on-close="onCloseAuthorize($dialogScope)"
                        ui-dialog-cache="false"
                        ui-dialog-url="${require('./dialog/special_authorize_edit.html?url')}"
                    >编辑</a>
                </td>
            </tr>
            </tbody>
        </table>
        <div class="no-data" style="display:none"><span>暂无数据</span></div>
    </div>
    <div id="pagination" class="pagination"></div>
</div>
